#ifndef DW_GRAPHICS_GRAPHICSMANAGER_H
#	define DW_GRAPHICS_GRAPHICSMANAGER_H

#include "base/singleton.h"

#include "graphics/backend.h"

namespace dw {
	namespace graphics {

class Renderer;

class GraphicsManager
:	public dw::base::Singleton< GraphicsManager >
{
protected : //! @name Construction & Destruction
	//! @{
	GraphicsManager();
	~GraphicsManager();
	//! @}

public:
	void initialize(const Backend::ContextSetup& contextSetup) { m_backend.initilize(contextSetup); }
	void setRenderer(Renderer* renderer) { _renderer = renderer; }
	Renderer& getRenderer() const { return *_renderer; }
	Backend& getBackend() { return m_backend; }

private :
	friend class dw::base::Singleton< GraphicsManager >;

private :
	Backend m_backend;
	Renderer* _renderer;
};

	} // namespace graphics
} // namespace dw

#endif // !DW_GRAPHICS_GRAPHICSMANAGER_H